package mylab.usm.jap.httpAdapter.jakarta;

import com.fujieid.jap.http.JapHttpRequest;
import com.fujieid.jap.http.JapHttpResponse;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import lombok.experimental.UtilityClass;

@UtilityClass
public class JakartaAdapterUtil {
    public JapHttpRequest request(HttpServletRequest request) {
        return new JakartaRequestAdapter(request);
    }

    public JapHttpResponse response(HttpServletResponse response) {
        return new JakartaResponseAdapter(response);
    }


    public JakartaCookieAdapter cookie(Cookie cookie) {
        return new JakartaCookieAdapter(cookie);
    }

    public JakartaSessionAdapter session(HttpSession session) {
        return new JakartaSessionAdapter(session);
    }

}
